angular.module('app', ['custom.route'])
    .config(function (RouteProvider) {

        RouteProvider.autoLoadService(false);
        RouteProvider.autoLoadController(false);
        RouteProvider.setRoute([{
            name    : 'sys',
            label   : '系统',
            files: [
                'sys/sys.js'
            ]
        }, {
            name : 'wechat',
            label: '微信',
            files: [
                'wechat/wechat.js'
            ]
        }]);
    })
    .run(function ($rootScope, Route) {
        $rootScope.routes = Route.getRoute();
        console.log($rootScope.routes);
        $rootScope.$on('ocLazyLoad.moduleLoaded', function(e, module) {
            console.log('module loaded', module);
        });
    });